# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=template-glib
pkgver=3.26.1
pkgrel=2
pkgdesc="A templating library for GLib"
url="https://git.gnome.org/browse/template-glib"
arch=(i686 x86_64)
license=(LGPL)
depends=(glib2 gobject-introspection-runtime)
makedepends=(git meson vala gobject-introspection gtk-doc)
_commit=b9a332a2baadfa7aaa46c16e1084a82489539b8f  # tags/3.26.1^0
source=("git+https://git.gnome.org/browse/template-glib#commit=$_commit"
        libdir.diff)
sha256sums=('SKIP'
            '9cb5343348ac313673201f33537db85a9bffde761231486b766628fe3355fdc7')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  mkdir build
  cd $pkgname
  patch -Np1 -i ../libdir.diff
}

build() {
  cd build
  arch-meson ../$pkgname -Denable_gtk_doc=true
  ninja
}

check() {
  cd build
  meson test
}

package() {
  cd build
  DESTDIR="$pkgdir" ninja install
}
